<template>
<!-- 首页幻灯 -->
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="cadetblue">
      <van-swipe-item v-for="banner in banners" :key="banner.id">
        <img :src="banner.picUrl" alt />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
export default {
  props: {
    banners: {
      type: Array,
      require: true
    }
  }
};
</script>

<style lang="scss" scoped>
.my-swipe {
  img {
    //图片老是顶上去
    width: 100%;
  }
}
</style>